<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模态框</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
</head>

<body>
    <div class="container"><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#myModal">
        打开模态框
      </button>
       
       
      <!-- 模态框 -->
      <div class="modal" id="myModal">
        <div class="modal-dialog">
          <div class="modal-content">
       
            <!-- 模态框头部 -->
            <div class="modal-header">
              <h4 class="modal-title">模态框标题</h4>
              <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
       
            <!-- 模态框内容 -->
            <div class="modal-body">
              模态框内容..
            </div>
       
            <!-- 模态框底部 -->
            <div class="modal-footer">
              <button type="button" class="btn btn-danger" data-bs-dismiss="modal">关闭</button>
            </div>
       
          </div>
        </div>
      </div></div>
    <br>
    <div class="container"><!-- 添加动画效果 -->
        <div class="modal fade"></div>
         
        <!-- 不使用动画效果 -->
        <div class="modal"></div></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>

    <script src="./js/bootstrap.bundle.min.js"></script>
</body>

</html>